package com.interfaces;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.entity.OpePower;
import com.entity.OpePowerPK;




/**   
* @Title: OpePowerDao.java 
* @Package com.interfaces 
* @author 孙梦楠 
* @date 2017年7月17日 上午11:16:36 
* @version V1.0.0   
*/

public interface OpePowerDao extends JpaRepository<OpePower, OpePowerPK>{
	
	
	@Transactional
	@Modifying
	@Query("select op.pk from OpePower op where op.pk.opeid = ?1")
	List<OpePower> findByOpeid(Integer opeid);
	
	@Transactional
	@Modifying
	@Query("select op.pk from OpePower op where op.pk.powerid = ?1")
	List<OpePower> findByPowerid(Integer powerid);
	 
}
